ensure correct ordering of concat::fragments#171
Open
kBite wants to merge 1 commit intovoxpupuli:masterfrom
Open
ensure correct ordering of concat::fragments#171kBite wants to merge 1 commit intovoxpupuli:masterfrom
kBite wants to merge 1 commit intovoxpupuli:masterfrom
Conversation
48d86ff to
365e2d2
Compare
Contributor
Author
|
@bastelfreak Do you have an idea how to test for correct ordering? |
> Fragments that share the same order number are ordered by name.
```
"${chain}-${interface}-aaa"
"${chain}-${interface}-${name}"
"${chain}-${interface}-zzz"
```
If `name` starts with upper case letter they're placed outside of
`interface eth0 {}`:
```
mod comment comment 'AAA-minimal_example' proto all ACCEPT;
interface eth0 {
mod comment comment 'aaa-minimal_example:' proto all ACCEPT;
mod comment comment 'minimal_example' proto all ACCEPT;
}
```
365e2d2 to
2ac5fd5
Compare
Member
|
With This module does have acceptance tests though. You should be able to test post apply file content with these if you want. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
If
namestarts with upper case letter they're placed outside ofinterface eth0 {}:I looked into testing for correct ordering, but didn't find a working solution.
There is (e.g.)
.that_comes_before, but that's testing againstbefore => ....I also unsuccessfully tried testing against the content of
File[/etc/ferm.d/chains/INPUT.conf]generated byconcat_file.